﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;

namespace 玄鸟刀剑2
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }
                       

        string url = @"https://dj-1300382743.cos.ap-chengdu.myqcloud.com/lang.spk";        
        
        private void button1_Click(object sender, EventArgs e)
        {
            WebClient web = new WebClient();
            web.DownloadProgressChanged += Web_DownloadProgressChanged;
            web.DownloadFileAsync(new Uri(url), "data.spk");

        }

        private void Web_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
        {

            label2.Text = e.ProgressPercentage + "%";
            progressBar1.Value = e.ProgressPercentage;


        }
    }
}
